// 用户信息接口
export interface UserInfo {
	id: string;
	username: string;
	nickname: string;
	avatar?: string;
	email?: string;
	roles: string[];
	permissions: string[];
}

export enum LoginStatusEnum {
	SUCCESS = "success",
	ERROR = "error",
}

export type LoginStatus = {
	status: LoginStatusEnum;
	message?: string;
	loading: boolean;
};

// 登录参数接口
export interface LoginParams {
	username: string;
	password: string;
}

// 用户状态接口
export interface UserState {
	token: string | null;
	userInfo: UserInfo | null;
	permissions: string[];
	roles: string[];
}
